package cool.taomu.toolkit.demo.controller

import javax.ws.rs.GET
import javax.ws.rs.MatrixParam
import javax.ws.rs.Path
import javax.ws.rs.PathParam
import javax.ws.rs.QueryParam
import org.slf4j.LoggerFactory

@Path("kademlia")
class LogoController {

	val static LOG = LoggerFactory.getLogger(LogoController);

	@GET
	@Path("/index2")
	def index(@QueryParam("x") String x) {
		LOG.info("*****/kademlia/index2*****:{}", x);
		return "Hello Kademlia2 " + x;
	}
	
	@GET
	@Path("/index3")
	def index3(@MatrixParam("x") String x) {
		LOG.info("*****/kademlia/index3*****:{}", x);
		return "Hello Kademlia3 " + x;
	}
	
	@GET
	@Path("/index2/{x}")
	def index2(@PathParam("x") String x) {
		LOG.info("*****/kademlia/index2*****:{}", x);
		return "Hello Kademlia2 " + x;
	}
	
	
}
